﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master"  Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="MarkControle.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Home Page
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h3><%:Html.ActionLink("Back", "Back", "Home")%><br /><%:Html.ActionLink("Next", "Next", "Home")%>
       </h3>
        
    <%TabelaMes prov = (TabelaMes)ViewData["tabelames"]; %>
    <%int m = (int)ViewData["mes"];%><%int a = (int)ViewData["ano"];Session["tempano"]=a;%><%int b = 9; %> <% using (Html.BeginForm("Diaria", "Home", FormMethod.Post))
                                                         {
                                                             Session["tempmes"]=m;%><h1 style="margin-left:45%; font-size:x-large;"><%switch(m){case 1:%>Janeiro<%break;%><%case 2:%>Fevereiro<%break;%><%case 3:%>Marco<%break;%><%case 4:%>Abril<%break;%><%case 5:%>Maio<%break;%><%case 6:%>Junho<%break;%><%case 7:%>Julho<%break;%><%case 8:%>Agosto<%break;%><%case 9:%>Setembro<%break;%><%case 10:%>Outubro<%break;%><%case 11:%>Novembro<%break;%><%case 12:%>Dezembro<%break;}%><%="/"+a.ToString() %></h1>
     <body>        



    <table>
    <%DateTime semana = new DateTime(); %>
    <tr>
     <th style="width: 553px; height: 27px;"><%semana = new DateTime(a, m, 1);%><%:semana.DayOfWeek.ToString()%></th>
     <th style="width: 553px; height: 27px;"><%semana = new DateTime(a, m, 2);%><%:semana.DayOfWeek.ToString()%></th>
     <th style="width: 553px; height: 27px;"><%semana = new DateTime(a, m, 3);%><%:semana.DayOfWeek.ToString()%></th>
     <th style="width: 553px; height: 27px;"><%semana = new DateTime(a, m, 4);%><%:semana.DayOfWeek.ToString()%></th>
     <th style="width: 553px; height: 27px;"><%semana = new DateTime(a, m, 5);%><%:semana.DayOfWeek.ToString()%></th>
     <th style="width: 553px; height: 27px;"><%semana = new DateTime(a, m, 6);%><%:semana.DayOfWeek.ToString()%></th>
     <th style="width: 553px; height: 27px;"><%semana = new DateTime(a, m, 7);%><%:semana.DayOfWeek.ToString()%></th>
    </tr>





    <tr>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='1'/>   <br />Cumprida:<%=prov.numtarefacomprida[m, 1]%><br />Adiada:<%=prov.numtarefadiada[m, 1]%><br />Atrasada:<%=prov.numtarefatrasada[m, 1]%><br />Pendente:<%=prov.pendente[m, 1]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='2'/>  <br />Cumprida:<%=prov.numtarefacomprida[m, 2]%><br />Adiada:<%=prov.numtarefadiada[m, 2]%><br />Atrasada:<%=prov.numtarefatrasada[m, 2]%><br />Pendente:<%=prov.pendente[m, 2]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='3'/><br />Cumprida:<%=prov.numtarefacomprida[m, 3]%><br />Adiada:<%=prov.numtarefadiada[m, 3]%><br />Atrasada:<%=prov.numtarefatrasada[m, 3]%><br />Pendente:<%=prov.pendente[m, 3]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='4'/><br />Cumprida:<%=prov.numtarefacomprida[m, 4]%><br />Adiada:<%=prov.numtarefadiada[m, 4]%><br />Atrasada:<%=prov.numtarefatrasada[m, 4]%><br />Pendente:<%=prov.pendente[m, 4]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='5'/><br />Cumprida:<%=prov.numtarefacomprida[m, 5]%><br />Adiada:<%=prov.numtarefadiada[m, 5]%><br />Atrasada:<%=prov.numtarefatrasada[m, 5]%><br />Pendente:<%=prov.pendente[m, 5]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='6'/><br />Cumprida:<%=prov.numtarefacomprida[m, 6]%><br />Adiada:<%=prov.numtarefadiada[m, 6]%><br />Atrasada:<%=prov.numtarefatrasada[m, 6]%><br />Pendente:<%=prov.pendente[m, 6]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='7'/><br />Cumprida:<%=prov.numtarefacomprida[m, 7]%><br />Adiada:<%=prov.numtarefadiada[m, 7]%><br />Atrasada:<%=prov.numtarefatrasada[m, 7]%><br />Pendente:<%=prov.pendente[m, 7]%></th>
    </tr> <tr>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='8'/><br />Cumprida:<%=prov.numtarefacomprida[m, 8]%><br />Adiada:<%=prov.numtarefadiada[m, 8]%><br />Atrasada:<%=prov.numtarefatrasada[m, 8]%><br />Pendente:<%=prov.pendente[m, 8]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='9'/><br />Cumprida:<%=prov.numtarefacomprida[m, 9]%><br />Adiada:<%=prov.numtarefadiada[m, 9]%><br />Atrasada:<%=prov.numtarefatrasada[m, 9]%><br />Pendente:<%=prov.pendente[m, 9]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='10'/><br />Cumprida:<%=prov.numtarefacomprida[m, 10]%><br />Adiada:<%=prov.numtarefadiada[m, 10]%><br />Atrasada:<%=prov.numtarefatrasada[m, 10]%><br />Pendente:<%=prov.pendente[m, 10]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='11'/><br />Cumprida:<%=prov.numtarefacomprida[m, 11]%><br />Adiada:<%=prov.numtarefadiada[m, 11]%><br />Atrasada:<%=prov.numtarefatrasada[m, 11]%><br />Pendente:<%=prov.pendente[m, 11]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='12'/><br />Cumprida:<%=prov.numtarefacomprida[m, 12]%><br />Adiada:<%=prov.numtarefadiada[m, 12]%><br />Atrasada:<%=prov.numtarefatrasada[m, 12]%><br />Pendente:<%=prov.pendente[m, 12]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='13'/><br />Cumprida:<%=prov.numtarefacomprida[m, 13]%><br />Adiada:<%=prov.numtarefadiada[m, 13]%><br />Atrasada:<%=prov.numtarefatrasada[m, 13]%><br />Pendente:<%=prov.pendente[m, 13]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='14'/><br />Cumprida:<%=prov.numtarefacomprida[m, 14]%><br />Adiada:<%=prov.numtarefadiada[m, 14]%><br />Atrasada:<%=prov.numtarefatrasada[m, 14]%><br />Pendente:<%=prov.pendente[m, 14]%></th>
    </tr> <tr>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='15'/><br />Cumprida:<%=prov.numtarefacomprida[m, 15]%><br />Adiada:<%=prov.numtarefadiada[m, 15]%><br />Atrasada:<%=prov.numtarefatrasada[m, 15]%><br />Pendente:<%=prov.pendente[m, 15]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='16'/><br />Cumprida:<%=prov.numtarefacomprida[m, 16]%><br />Adiada:<%=prov.numtarefadiada[m, 16]%><br />Atrasada:<%=prov.numtarefatrasada[m, 16]%><br />Pendente:<%=prov.pendente[m, 16]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='17'/><br />Cumprida:<%=prov.numtarefacomprida[m, 17]%><br />Adiada:<%=prov.numtarefadiada[m, 17]%><br />Atrasada:<%=prov.numtarefatrasada[m, 17]%><br />Pendente:<%=prov.pendente[m, 17]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='18'/><br />Cumprida:<%=prov.numtarefacomprida[m, 18]%><br />Adiada:<%=prov.numtarefadiada[m, 18]%><br />Atrasada:<%=prov.numtarefatrasada[m, 18]%><br />Pendente:<%=prov.pendente[m, 18]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='19'/><br />Cumprida:<%=prov.numtarefacomprida[m, 19]%><br />Adiada:<%=prov.numtarefadiada[m, 19]%><br />Atrasada:<%=prov.numtarefatrasada[m, 19]%><br />Pendente:<%=prov.pendente[m, 19]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='20'/><br />Cumprida:<%=prov.numtarefacomprida[m, 20]%><br />Adiada:<%=prov.numtarefadiada[m, 20]%><br />Atrasada:<%=prov.numtarefatrasada[m, 20]%><br />Pendente:<%=prov.pendente[m, 20]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='21'/><br />Cumprida:<%=prov.numtarefacomprida[m, 21]%><br />Adiada:<%=prov.numtarefadiada[m, 21]%><br />Atrasada:<%=prov.numtarefatrasada[m, 21]%><br />Pendente:<%=prov.pendente[m, 21]%></th>
    </tr> <tr>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='22'/><br />Cumprida:<%=prov.numtarefacomprida[m, 22]%><br />Adiada:<%=prov.numtarefadiada[m, 22]%><br />Atrasada:<%=prov.numtarefatrasada[m, 22]%><br />Pendente:<%=prov.pendente[m, 22]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='23'/><br />Cumprida:<%=prov.numtarefacomprida[m, 23]%><br />Adiada:<%=prov.numtarefadiada[m, 23]%><br />Atrasada:<%=prov.numtarefatrasada[m, 23]%><br />Pendente:<%=prov.pendente[m, 23]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='24'/><br />Cumprida:<%=prov.numtarefacomprida[m, 24]%><br />Adiada:<%=prov.numtarefadiada[m, 24]%><br />Atrasada:<%=prov.numtarefatrasada[m, 24]%><br />Pendente:<%=prov.pendente[m, 24]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='25'/><br />Cumprida:<%=prov.numtarefacomprida[m, 25]%><br />Adiada:<%=prov.numtarefadiada[m, 25]%><br />Atrasada:<%=prov.numtarefatrasada[m, 25]%><br />Pendente:<%=prov.pendente[m, 25]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='26'/><br />Cumprida:<%=prov.numtarefacomprida[m, 26]%><br />Adiada:<%=prov.numtarefadiada[m, 26]%><br />Atrasada:<%=prov.numtarefatrasada[m, 26]%><br />Pendente:<%=prov.pendente[m, 26]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='27'/><br />Cumprida:<%=prov.numtarefacomprida[m, 27]%><br />Adiada:<%=prov.numtarefadiada[m, 27]%><br />Atrasada:<%=prov.numtarefatrasada[m, 27]%><br />Pendente:<%=prov.pendente[m, 27]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='28'/><br />Cumprida:<%=prov.numtarefacomprida[m, 28]%><br />Adiada:<%=prov.numtarefadiada[m, 28]%><br />Atrasada:<%=prov.numtarefatrasada[m, 28]%><br />Pendente:<%=prov.pendente[m, 28]%></th>
    </tr> <tr>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='29'/><br />Cumprida:<%=prov.numtarefacomprida[m, 29]%><br />Adiada:<%=prov.numtarefadiada[m, 29]%><br />Atrasada:<%=prov.numtarefatrasada[m, 29]%><br />Pendente:<%=prov.pendente[m, 29]%></th>
    <%if (DateTime.DaysInMonth(a, m) == 30)
      {%><th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='30'/><br />Cumprida:<%=prov.numtarefacomprida[m, 30]%><br />Adiada:<%=prov.numtarefadiada[m, 30]%><br />Atrasada:<%=prov.numtarefatrasada[m, 30]%><br />Pendente:<%=prov.pendente[m, 30]%></th><%}%>
    <%else if(DateTime.DaysInMonth(a,m)==31){%>  
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='30'/><br />Cumprida:<%=prov.numtarefacomprida[m, 30]%><br />Adiada:<%=prov.numtarefadiada[m, 30]%><br />Atrasada:<%=prov.numtarefatrasada[m, 30]%><br />Pendente:<%=prov.pendente[m, 30]%></th>
    <th style="width: 553px; height: 180px;"><input type='submit' name='dia' value='31'/><br />Cumprida:<%=prov.numtarefacomprida[m, 31]%><br />Adiada:<%=prov.numtarefadiada[m, 31]%><br />Atrasada:<%=prov.numtarefatrasada[m, 31]%><br />Pendente:<%=prov.pendente[m, 31]%></th><%}%>
    <th style="width: 553px; height: 180px;"></th><%} %>
    <th style="width: 553px; height: 180px;"></th>
    <th style="width: 553px; height: 180px;"></th>
    <th style="width: 553px; height: 180px;"></th>
    </tr>
    
          
    </table></body>
        
        <%MarkControle.Models.Login depa = (MarkControle.Models.Login)Session["login"]; try
          {
              if (depa.mec.Acesso == 2)
              {%>
              <%:Html.ActionLink("Delete.funcionario", "Deletefun", "Login")%>
              <%}
          }
          catch { }%>
        
        
        
        
    
</asp:Content>
